﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Drawing.Drawing2D;

namespace LedControl
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        DrawPic drawPic;
        private void groupBox1_Enter(object sender, EventArgs e)
        {

        }

        private void numericUpDown1_ValueChanged(object sender, EventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {
            double[] Leds = new double[11];
            decimal[] x = new decimal[11];
            x[0] = numericUpDown1.Value;
            x[1] = numericUpDown2.Value;
            x[2] = numericUpDown3.Value;
            x[3] = numericUpDown4.Value;
            x[4] = numericUpDown5.Value;
            x[5] = numericUpDown6.Value;
            x[6] = numericUpDown7.Value;
            x[7] = numericUpDown8.Value;
            x[8] = numericUpDown9.Value;
            x[9] = numericUpDown10.Value;
            x[10] = numericUpDown11.Value;
            for (int i = 0; i < 11; i++)
            {
                Leds[i] = (double)x[i];
            }
            drawPic.DrawScreen(Leds);
        }

        

        private void button2_Click(object sender, EventArgs e)
        {
            drawPic.DrawScreen(new double[11]);
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            //this.WindowState = FormWindowState.Normal;
            drawPic = new DrawPic();
        }

        private void button3_Click(object sender, EventArgs e)
        {
            numericUpDown1.Value = 0;
            numericUpDown2.Value = 0;
            numericUpDown3.Value = 0;
            numericUpDown4.Value = 0;
            numericUpDown5.Value = 0;
            numericUpDown6.Value = 0;
            numericUpDown7.Value = 0;
            numericUpDown8.Value = 0;
            numericUpDown9.Value = 0;
            numericUpDown10.Value = 0;
            numericUpDown11.Value = 0;

        }

        private void label19_Click(object sender, EventArgs e)
        {

        }

        private void label13_Click(object sender, EventArgs e)
        {

        }
        
    }
}
